<template>
  <div class="page">
    <div class="scroll-view">
      <customHeader middleTitle="券营销" @leftCallBack="goBack"/>
      <div class="page-body"><i class="sl-activity-creation"></i>
        <template v-for="(item,index) in list">
          <mt-cell class="list-cell" :key="index" :title="item.title" :label="item.label" :to="item.path" is-link>
            <img slot="icon" :src="item.imgSrc" class="list-icon"/>
          </mt-cell>
        </template>
      </div>
    </div>
  </div>
</template>

<script>
import customHeader from "@/components/header/header";
import jsBridge from "@/tools/jsBridge.js";

export default {
  components: {
    customHeader
  },
  data() {
    return {
      list: [{
        title: '活动创建',
        label: '满减、消费赠、拉新、引流，创建活动提升营业额',
        path: '/couponMarketing/couponList',
        imgSrc: require('../../../static/images/ticket_cj.jpg')
      }, {
        title: '活动管理',
        label: '管理已创建的活动，查看活动数据',
        path: '/couponMarketing/couponManage',
        imgSrc: require('../../../static/images/ticket_gl.jpg')
      }, {
        title: '核销记录',
        label: '活动的核销概况及明细',
        path: '/couponMarketing/couponRecord',
        imgSrc: require('../../../static/images/ticket_jl.png')
      }]
    };
  },
  methods: {
    goBack() {
      if(String(this.$route.query.close)=='true') {
        jsBridge.closeWindow();
      }else {
        this.$router.back();
      }
    }
  }
}
</script>

<style lang="scss" scoped>
@import "../../style/public";
.list {
  &-cell {
    @include remCalc(margin-top, 20);
    @include remCalc(min-height, 120);
    @include thin-border(true, false);
    overflow: visible;
    &.mint-cell:last-child, /deep/ .mint-cell-wrapper {
      background-image: none;
      .mint-cell-label {
        @include remCalc(margin-top, 18);
        @include remCalc(font-size, 24);
      }
      .mint-cell-title {
        @include remCalc(font-size, 32);
        @include remCalc(height, 80);
        line-height: 1;
      }
    }
  }
  &-icon {
    float: left;
    font-size: 0;
    @include remCalc(width, 80);
    @include remCalc(height, 80);
    @include remCalc(border-radius, 5);
    @include remCalc(margin-right, 20);
  }
}
</style>